//
//  SimPullDownTextField.h
//
//  Created by Xubin Liu on 14-9-25.
//

#import <UIKit/UIKit.h>

@class SimPullDownTextField;

typedef void(^SimShowListBlock)(BOOL);

@protocol SimPullDownTextFieldDelegate <NSObject>

@optional
- (void)pullDownTextFieldDidShow:(SimPullDownTextField *)textField;
- (void)pullDownTextFieldDidClose:(SimPullDownTextField *)textField;

- (BOOL)pullDownTextField:(SimPullDownTextField *)textField willSelectIndex:(NSUInteger)index;
- (void)pullDownTextField:(SimPullDownTextField *)textField didSelectIndex:(NSUInteger)index;


@end

@interface SimPullDownTextField : UITextField

@property (nonatomic, strong) NSArray *dataList;
@property (nonatomic, strong) CAShapeLayer *triangleLayer;
@property (nonatomic, strong) UIColor *highlightedColor;
@property (nonatomic) NSInteger selectedIndex;
@property(nonatomic,weak)id<SimPullDownTextFieldDelegate> pullDelegate;
@property (nonatomic, strong) SimShowListBlock  simShowListBlock;

@end
